#ifndef LA_MATRIX_H
#define LA_MATRIX_H

#include <vector>

class LAMatrix
{
public:
	LAMatrix( int m, int n );
	~LAMatrix(void);

	float& operator () ( int l, int c );
	
	void clear();

	void mult( float* vector, float* out );
	void operator+=( LAMatrix& matrix );
	void operator*=( float a );

	void operator*=( LAMatrix& rhs );

	float norm();
	float det();

	//LAMatrix invert();
	void invert();

	inline int getN()
	{
		return n;
	}

	inline int getM()
	{
		return m;
	}

	void print();

protected:
	// number of lines
	int m;

	// number of columns
	int n;

	std::vector< float > matrixData;

	float internalDet( float**a, int n );
};

#endif

